﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Globalization;

namespace NTTDATA.BEENChina.ResultCertification.UI
{
    public partial class FormMain : Form
    {
        public FormMain()
        {
            InitializeComponent();
        }

        private void verfitySettingToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormVerfityList formVerfityList = new FormVerfityList();
            formVerfityList.MdiParent = this;
            formVerfityList.Show();

        }

        private void categoryVerfityToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormCategoryModify formCategoryModify = new FormCategoryModify();
            formCategoryModify.MdiParent = this;
            formCategoryModify.Show();
        }

        private void runningSettingToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormCheckCondition formCheckCondition = new FormCheckCondition();
            formCheckCondition.MdiParent = this;
            formCheckCondition.Show();
        }

        Logic.CheckMonitor checkMonitor = new Logic.CheckMonitor();

        private void runToolStripMenuItem_Click(object sender, EventArgs e)
        {

            checkMonitor.Start();

        }
        private void stopToolStripMenuItem_Click(object sender, EventArgs e)
        {
            checkMonitor.Stop();
        }
        private void runningStateToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormMonitor formMonitor = new FormMonitor();
            formMonitor.MdiParent = this;
            formMonitor.Show();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            CultureInfo ci = new CultureInfo("ja-JP");
            Calendar cal = new JapaneseCalendar();
            ci.DateTimeFormat.Calendar = cal;
            DateTime dt = DateTime.Parse("2013/01/01");


            string strWareki = ci.DateTimeFormat.GetAbbreviatedEraName(cal.GetEra(dt)) + dt.ToString("yy", ci);
            Console.WriteLine(strWareki); // output: 平18/09/26 
        }



        private void testToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormImportTestData frm = new FormImportTestData();
            frm.MdiParent = this;
            frm.Show();
        }
    }
}